package com.imagination.applet.domain.photo.model;

import com.imagination.applet.domain.common.entity.AbstractEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

@SuperBuilder
@Entity
@Table(name = "t_user_fs_photo_metrics")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class UserPhotoMetric extends AbstractEntity {

    public static final Integer MAX_PHOTO_NUMBER = 1;

    public static final Integer VIP_MAX_PHOTO_NUMBER = 4;

    @Column(name = "user_id")
    private Long userId;
//    @OneToOne(mappedBy = "id")
//    @JoinColumn(name = "userId")
//    private User user;

    @Column(name = "number")
    private Integer number;

    public boolean exceed() {

        return number > MAX_PHOTO_NUMBER;
    }
}
